<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" url="https://fastly.jsdelivr.net/gh/ZEC-dev/CDN@main/css/prism.css">
    <link rel="script" url="https://fastly.jsdelivr.net/gh/ZEC-dev/CDN@main/css/prism.js">
    <link rel="stylesheet" url="https://fastly.jsdelivr.net/gh/ZEC-dev/CDN@main/css/CSS.css">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ZECBlog</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head><!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" url="https://fastly.jsdelivr.net/gh/ZEC-dev/CDN@main/css/prism.css">
    <link rel="script" url="https://fastly.jsdelivr.net/gh/ZEC-dev/CDN@main/css/prism.js">
    <link rel="stylesheet" url="https://fastly.jsdelivr.net/gh/ZEC-dev/CDN@main/css/CSS.css">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>可伸缩侧边栏布局</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body>
    <div class="container">
        <!-- 侧边栏 -->
        <aside class="sidebar">
            <div class="sidebar-header">
                <div class="logo">
                    <span class="logo-text">ZEC</span>
                </div>
                <button class="toggle-btn">
                    <i class="fas fa-chevron-left"></i>
                </button>
            </div>
            
            <div class="sidebar-menu">
                <div class="menu-item">
                    <i class="fas fa-home"></i>
                    <span class="menu-text"><a href="../">Blog首页</a></span>
                </div>
            </div>
            <div class="sidebar-menu">
                <div class="menu-item">
                    <i class="fas fa-home"></i>
                    <span class="menu-text"><a href="../../">首页</a></span>
                </div>
            </div>
            
            <div class="sidebar-card">
                <h3>提示</h3>
                <p>点击左上角按钮可收缩/展开侧边栏。</p>
            </div>
        </aside>
        
<h1>w</h1>
<p>欢迎来到我的博客文章！</p>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const toggleBtn = document.querySelector('.toggle-btn');
            const sidebar = document.querySelector('.sidebar');
            
            toggleBtn.addEventListener('click', function() {
                sidebar.classList.toggle('collapsed');
            });
        });
    </script>
</body>
</html>
